#include <GL/glew.h>
#include <GL/freeglut.h>
#include "glm/glm.hpp"
#include <vector>

#include "shader.h"
#include "fbo.h"
#include "ilcontainer.h"

class Picture
{
	public:
		Picture();
		~Picture();

		void SetSource(glm::ivec2 source);
		void SetDestination(glm::ivec2 destination);

		void Display();

		bool Initialize();
		void TakeDown();

	private:
		glm::vec3 position;
		GLfloat rotation;

		int widthInPixels;
		int heightInPixels;

		glm::ivec2 source;
		glm::ivec2 destination;

		Shader * shader;
		FrameBufferObject * frameBuffer;
		
		vector<glm::vec2> sh_vertices;
		GLuint vertex_coordinate_handle;
		GLuint vertex_array_handle;

		ILContainer * image_container;
};